public class Paper {
    private final String title; //论文题目，长度至少为3个字符

    public Paper(String title) {
        if (title == null || title.length() < 3) {
            throw new IllegalArgumentException("标题不能为空且长度至少为3个字符");
        }
        this.title = title;
    }

    public String getTitle() {
        return this.title;
    }

    @Override
    public String toString() {
        return this.title + " (" + this.getClass().getName() + ")";
    }

    // 三种类型的论文子类
    public static class Thesis extends Paper {
        public Thesis(String title) {
            super(title);
        }
    }

    public static class JournalPaper extends Paper {
        public JournalPaper(String title) {
            super(title);
        }
    }

    public static class ConferencePaper extends Paper {
        public ConferencePaper(String title) {
            super(title);
        }
    }
}